package nz.ac.massey.softwarec.group3.actions;
import javax.servlet.http.HttpSession;
import nz.ac.massey.softwarec.group3.game.Game;
import nz.ac.massey.softwarec.group3.game.Player;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author Natalie
*/
public class ActionInterfaceTest {
private Action actionTest;
private Player player;
private String action;
private String value;
private Game game;
private HttpSession session;
@Before
public void setUp() {
actionTest = new Action(player, action, value, game, session);
}
@After
public void tearDown() {
actionTest = null;
}
/**
* Test of getPlayer method, of class Action.
*/
@Test
public void testGetPlayer() {
System.out.println("getPlayer");
Player result = actionTest.getPlayer();
Player expResult = player;
assertEquals(result, expResult);
}
/**
* Test of getActionType method, of class Action.
*/
@Test
public void testGetAction() {
System.out.println("getAction");
String result = actionTest.getActionType();
String expResult = action;
assertEquals(result, expResult);
}
/**
* Test of getValue method, of class Action.
*/
@Test
public void testGetValue() {
System.out.println("getValue");
String result = actionTest.getValue();
String expResult = value;
assertEquals(result, expResult);
}
/**
* Test of getGame method, of class Action.
*/
@Test
public void testGetGame() {
System.out.println("getGame");
Game result = actionTest.getGame();
Game expResult = game;
assertEquals(result, expResult);
}
/**
* Test of getSession method, of class Action.
*/
@Test
public void testGetSession() {
System.out.println("getSession");
HttpSession result = actionTest.getSession();
HttpSession expResult = session;
assertEquals(result, expResult);
}
}